import { ROLES } from '@/constants';
// 根据后端返回的角色列表返回对应的角色等级，超级管理员是4，管理员是3，康复师是2，康复对象是1
export function getRoleLevel(roleList: string[]) {
  if (roleList.includes(ROLES.SUPER_ADMIN)) {
    return 4;
  } else if (roleList.includes(ROLES.ADMIN)) {
    return 3;
  } else if (roleList.includes(ROLES.DOCTOR)) {
    return 2;
  } else if (roleList.includes(ROLES.PATIENT)) {
    return 1;
  }
}
